<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    let user = {
        name:"father",
        age:3,
        run: function (name) {
            console.log(name + "在跑！！");
        }
    };
    let lx = {
        name: "lx"
    };
    //指定lx的原型为user对象，拥有其属性和方法
    lx._proto_ = user;

    console.log(lx._proto_.run("hwq")); //hwq在跑！！
    console.log(lx._proto_.age);//3
    console.log(lx._proto_.name);//father
</script>
</body>
</html>